﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="PlannedTask.cs" company="ELEN 7045 GROUP II">
//   Contributed by E.Vosloo
// </copyright>
// <summary>
//   The PlannedTask class of the StudyDefinition entity module.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace Domain.StudyDefinition.Entities
{
    #region

    using System;

    #endregion

    /// <summary>
    /// The PlannedTask class of the Study definition entity module.
    /// </summary>
    public class PlannedTask
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PlannedTask"/> class.
        /// </summary>
        public PlannedTask()
        {
            this.SuggestedPlan = new SuggestedPlan();
        }

        #region Properties

        /// <summary>
        /// Gets or sets the id.
        /// </summary>
        /// <value>
        /// The id of the scheduled task.
        /// </value>
        public int Id { get; set; }

        /// <summary>
        /// Gets or sets the description.
        /// </summary>
        /// <value>
        /// The description.
        /// </value>
        public string Description { get; set; }

        /// <summary>
        /// Gets or sets the name.
        /// </summary>
        /// <value>
        /// The name of the scheduled task.
        /// </value>
        public string Name { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [requires troubleshooter].
        /// </summary>
        /// <value>
        /// <c>true</c> if [requires troubleshooter]; otherwise, <c>false</c>.
        /// </value>
        public bool IsRoundTroubleshooter { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [produces labwork].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [produces labwork]; otherwise, <c>false</c>.
        /// </value>
        public bool ProducesLabwork { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether [requires assistant].
        /// </summary>
        /// <value>
        ///   <c>true</c> if [requires assistant]; otherwise, <c>false</c>.
        /// </value>
        public bool RequiresAssistant { get; set; }

        /// <summary>
        /// Gets or sets the round id.
        /// </summary>
        /// <value>
        /// The round id.
        /// </value>
        public int RoundNumber { get; set; }

        /// <summary>
        /// Gets or sets the associated scheduled task.
        /// </summary>
        /// <value>
        /// The associated scheduled task.
        /// </value>
        public PlannedTask AssociatedPlannedTask { get; set; }

        #endregion

        #region VALUE OBJECTS

        /// <summary>
        /// Gets the planning information.
        /// </summary>
        public SuggestedPlan SuggestedPlan { get; private set; }

        #endregion


    }

    /// <summary>
    /// Suggested Plan Value Object
    /// </summary>
    public class SuggestedPlan
    {
        /// <summary>
        /// Gets or sets a value indicating whether this instance is key stone task.
        /// </summary>
        /// <value>
        /// <c>true</c> if this instance is key stone task; otherwise, <c>false</c>.
        /// </value>
        public bool IsKeyStoneTask { get; set; }

        /// <summary>
        /// Gets or sets the protocol time indicating the ideal time that the planned task should be performed.
        /// </summary>
        /// <value>
        /// The protocol time.
        /// </value>
        public TimeSpan ProtocolTime { get; set; }

        /// <summary>
        /// Gets or sets the setup duration of this task.
        /// </summary>
        /// <value>
        /// The setup duration of the task.
        /// </value>
        public TimeSpan SetupDuration { get; set; }
    }
}
